/* 
 * File:   init.h
 * Author: bram
 *
 * Created on February 7, 2014, 9:57 PM
 */

#ifndef INIT_H
#define	INIT_H

#ifdef	__cplusplus
extern "C" {
#endif


#define FCY 40000000 //Instruction cycle rate (Osc x PLL / 4)

#define CL_ON           0

#define TIMER LATCbits.LATC3
#define GLED LATCbits.LATC4
#define OLED LATCbits.LATC5
#define RLED LATCbits.LATC6
#define DEMAGS LATCbits.LATC3
#define DEBUG LATCbits.LATC3
#define MAA LATAbits.LATA1
#define MBA LATCbits.LATC13
#define MCA LATCbits.LATC0

#define PI 3.141592654

void InitCLOCK(void);
void InitPort(void);
void InitINT(void);
void InitADC(void);
void InitDAC(void);
void InitPWM(void);



#ifdef	__cplusplus
}
#endif

#endif	/* INIT_H */

